package xyz.ddlnt.serviceusrclient.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import xyz.ddlnt.commonutil.result.Result;
import xyz.ddlnt.model.dto.FollowDTO;
import xyz.ddlnt.model.dto.PageDTO;
import xyz.ddlnt.model.vo.FollowVO;

import java.util.List;

/**
 * @author ZZULI_SE 210910
 * @data 2025/5/10 22:45
 */
//@FeignClient(name = "service-usr", url = "http://yixuewang-service-usr:9015", path = "/follow")
//@FeignClient(name = "service-usr", url = "http://localhost:9005", path = "/follow")
@FeignClient(value = "service-usr" ,  path="/follow")
public interface FollowFeignClient {

    /**
     * 关注用户
     * @param followDTO
     * @return
     */
    @PostMapping("/followUser")
    Result<Boolean> FollowUser(@RequestBody FollowDTO followDTO);

    /**
     * 取消关注用户
     * @param followDTO
     * @return
     */
    @PostMapping("/unfollowUser")
    Result<Boolean> unfollowUser(@RequestBody FollowDTO followDTO);

    /**
     * 判断用户是否关注了某个用户
     * @param followDTO
     * @return
     */
    @PostMapping("/isFollowed")
    Result<Boolean> isFollowed(@RequestBody FollowDTO followDTO);

    /**
     * 获取关注列表
     * @param pageDTO
     * @return
     */
    @PostMapping("/getFollowList")
    Result<List<FollowVO>> getFollowList(@RequestBody PageDTO pageDTO);

    /**
     * 获取粉丝列表
     * @param pageDTO
     * @return
     */
    @PostMapping("/getFansList")
    Result<List<FollowVO>> getFansList(@RequestBody PageDTO pageDTO);
}
